package ast.exp;

import icg.EQLiteral;
import ast.type.Type;

public class LitIntExp extends Expression {
	private Integer value;

	public LitIntExp(Integer value) {
		this.value = value;
		this.type = Type.INTEGER;
	}

	@Override
	public String toString() {
		return "<LitIntExp value=\"" + value + "\" />";
	}

	@Override
	public Type typeCheck() {
		return type;
	}

	@Override
	public void genCode() {
		this.addr = new EQLiteral(value.toString());
	}
}
